<include file="Inc/header" />
<script type="text/javascript">
    function submitFun(act)
    {
        form1.action.value = act;
        form1.submit();
    }
</script>
<script>
    jQuery(function ($) {
        $("#btnPrint").click(function(){
            var phtml = $("#printArea").html();
           // alert(phtml);
            myPrint(phtml)
          //  $("#printArea").printArea();
        });
    });
    function myPrint(obj) {
            var newWindow = window.open("print.htm", "_blank"); //print.htm为同目录下的htm空页面
            newWindow.document.write(obj);
            newWindow.document.close();
            newWindow.print();
            newWindow.close();
    }
</script>

        <div class="content-box">
            <!-- Start Content Box -->
            <div class="content-box-header">
                <form name='form1' action="{:U('Admin/Kucun/chukuzhang')}" method="get">
                    <include file="Inc/menu"/>
                    <div class="clear"></div>

            </div>
            <!-- End .content-box-header -->
            <div class="content-box-content">
                <div class="tab-content default-tab" id="tab1">
                    <input id="btnPrint" type="button" value="点击打印"></input>
                    <if id="printArea">
                        <style type="text/css">
                            table.gridtable {
                                font-family: verdana,arial,sans-serif;
                                font-size:11px;
                                color:#333333;
                                border-width: 1px;
                                border-color: #666666;
                                border-collapse: collapse;
                                width:98%;
                            }
                            table.gridtable th {
                                border-width: 1px;
                                padding: 8px;
                                border-style: solid;
                                border-color: #666666;
                                background-color: #dedede;
                            }
                            table.gridtable td {
                                border-width: 1px;
                                padding: 8px;
                                border-style: solid;
                                border-color: #666666;
                                background-color: #ffffff;
                            }
                            table.gridtable .title {
                                border-width: 0px;
                                padding: 18px;
                                border-style: solid;
                                border-color: #666666;
                                font-size: x-large;
                                background-color: #ffffff;
                            }
                            table.gridtable .ftitle {
                                border-width: 0px;
                                padding: 10px;
                                border-style: solid;
                                border-color: #666666;
                                background-color: #ffffff;
                            }
                        </style>
                        <table class="gridtable">
                          <volist name="stus" id="user">

                                <if condition="$user['fenye'] eq '1' ">
                            </table>
                            <div style="page-break-after:always;"></div><!--打印分页-->
                               </if>
                               <if condition="$user['title'] eq '1' ">
                                   <table class="gridtable">
                            <tr>
                                <td colspan="11" style="text-align: center;" class="title">{$school_info.name}出库分类账</td>
                            </tr>
                            <tr>
                                <th width="15%">日期</th>
                                <th width="2%">字</th>
                                <th width="3%">号</th>
                                <th width="10%">摘  要</th>
                                <th width="8%">入单价</th>
                                <th width="11%">入数量</th>
                                <th width="9%">入总价</th>
                                <th width="8%">出单价</th>
                                <th width="10%">出数量</th>
                                <th width="9%">出总价</th>
                                <th width="15%">余额</th>
                            </tr>
                            <tr>
                                <td colspan="11" style="text-align: left;">{$user['sort']}:{$user['name']}</td>
                            </tr>
                               </if>

                               <tr>
                                  <td>{$user['date']}</td>
                                  <td>{$user['style']}</td>
                                  <td>{$user['danjuhao']}</td>
                                  <td>{$user['memo']}</td>
                                  <td>{$user['r_price']}</td>
                                  <td>{$user['number']}{$user['r_unit']}</td>
                                  <td>{$user['r_total']}</td>
                                  <td>{$user['c_price']}</td>
                                  <td>{$user['out_number']}{$user['c_unit']}</td>
                                  <td>{$user['c_total']}</td>
                                  <td><span style="text-align: right;">￥{$user['show_total']}</span></td>
                              </tr>
                        </volist>
                    </table>
                    </div>
                <!-- End #tab1 -->

            </div>
            <!-- End .content-box-content -->
        </div>

        <include file="Inc/footer"/>
